package com.haixiaoke.saas.order.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.haixiaoke.saas.common.annotation.Excel;
import com.haixiaoke.saas.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.beans.factory.annotation.Autowired;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 退房订单对象 biz_check_out_order
 *
 * @author panda
 * @date 2024-04-19
 */
@Data
public class CheckOutOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 退款订单id
     */
    private String checkOutOrderId;

    /**
     * 退款来源(1.订单管理)
     */
    private String checkOutSource;

    /**
     * 订单id
     */
    @Excel(name = "订单id")
    private String orderId;

    /**
     * 子订单id集合
     */
    @Excel(name = "子订单id集合")
    private String suborderIds;

    /**
     * 房屋id
     */
    @Excel(name = "房屋id")
    private String houseId;

    /**
     * 退款状态(1.退款中,2.退款异常,3.退款成功,4.已取消,5.待付款,6.已补缴)
     */
    @Excel(name = "退款状态", readConverterExp = "1=退款中,2=退款异常,3=退款成功,4=已取消,5=待付款,6=已补缴", combo = {"退款中", "退款异常","退款成功","已取消","待付款","已补缴"})
    private String refundOrderState;

    /**
     * 退款总金额
     */
    private BigDecimal totalRefundAmount;

    /**
     * 已退款金额
     */
    private BigDecimal refundedAmount;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "退房时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date checkOutTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date checkInTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "验房时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date inspectionTime;

    /**
     * 预订人
     */
    @Excel(name = "预订人")
    private String reserveUser;

    /**
     * 预定人id
     */
    @Excel(name = "预定人id")
    private Long reserveUserId;

    /**
     * 预订人手机号
     */
    @Excel(name = "预订人手机号")
    private String reserveUserPhone;

    /**
     * 删除标志（0代表存在
     */
    private String delFlag;

    private String lesseeName;
    private String phone;
    private String premisesAddress;
}
